package 传智播客_黑马.java高级.函数式.函数式编程;

public class 函数式接口作为方法的参数 {
    /*

     */
    public static void startThread(Runnable run){
        new Thread(run).start();
    }

    public static void main(String[] args) {
        startThread(()->{
            System.out.println("新的线程已经开启" + Thread.currentThread().getName());
        });

        startThread(()->{
            System.out.println("新的线程已经开启" + Thread.currentThread().getName());
        });
    }
}
